package org.example.route.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.route.model.pojo.Shopping;

@Mapper
public interface ShoppingMapper {
    @Insert("insert into shopping (order_id, pay) VALUES (#{orderId},#{pay})")
    void add(Shopping shopping);

    @Select("select * from shopping where id = #{shoppingId}")
    Shopping getById(Long shoppingId);

    @Delete("delete from shopping where id =#{id}")
    void deleteById(Long id);
}
